<?php

$host = "localhost";
$user = "";
$pass = "";

$databaseName = "test";
$tableName = "users";

$con = mysql_connect($host,$user,$pass);
$dbs = mysql_select_db($databaseName, $con) or die(mysql_error());
			  
get the username  
$username = $_GET['user']; 
$password = $_GET['pass']; 			

$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);

$query = "SELECT * from users WHERE Username = '$username' AND Password='$password'";

$result = mysql_query($query) or die(mysql_error());  

if(mysql_num_rows($result)!=0
{
	echo "wrong username and/or password";	
}
else
{
	echo "success!";
}
?>